home *** CD-ROM | disk | FTP | other *** search
-
-
- EMU Processor Emulator
-
-
-
- EMU performs a software simulation of the target processor to enable the
- verfication of program logic. Software emulation cannot replace hardware
- emulation for testing aspects of your program which depend upon the timing of
- critical external events, or for interaction with real world devices. EMU does
- provide symbolic debugging of the logic portions of your program, and may thus
- prove convenient for testing those portions of your program before submitting
- the program to hardware for a full scale test.
-
-
-
- Input to EMU consists of an object file .HEX produced by the MACxx assembler,
- and an optional .SYM file which can be produced at the time of assembly. EMU
- looks for the .SYM file on the same disk drive as the hex object file. The
- symbol file can be produced by following the assembly option immediately (no
- space separating) with another drive specification:
-
-
- MACxx SOURCE.ABE creates the hex file on drive B,reading the source
- file on drive A. No listing or SYM files are produced.
-
- MACxx SOURCE.ABEB creates a symbol file on drive B as well as the hex
- file. The drive selected for the .SYM file should
- be the same as that selected for the object file if
- the symbol file is to be used by EMU.
-
-
-
- EMU is menu driven: at various stages of its operation you can bring up a menu
- and select from a suite of functions. The menu items are generally self
- explanatory however the following notes should augment the menu notes.
-
-
-
- The main control menu consists of:
-
-
- A Assemble
- B Set Offset Bias
- D Display Memory
- E Enter Memory
- F Fill Memory
- L Load Program
- M Move Memory
- Q Quit
- S Search Memory
- T Display Symbol Table
- U Disassemble Memory
- X Emulation Monitor
- = Evaluate Expression
-
-
-
-
-
- Response to the menu consists of one of the above characters, followed by a
- parameter list. You may enter your response in either upper or lower case. If
- a SYM file was accessed by program load, the parameter list can contain valid
- references to the symbol table. An invalid expression in the paramter list
- voids the entire list. Numeric parameters are default hex. If you wish to
- represent a decimal number it must be suffixed by t (for ten). Since EMU
- allows symbolic references, which must begin with an alphabetic character,
- numeric entries must begin with a digit. Thus FF represents the symbol FF,
- which may not be found in the symbol table, and 0FF repesents the hex value.
-
-
-
-
-
- L Load Program
-
-
-
-
-
-
- Program loading is cumulative, in that the workspace area and symbol table are
- not cleared before program load. You may therefore load individual program
- segments separately. If duplicate symbols exist in the separate load segments
- the expression evaluator will find only the last definition.
-
-
-
-
- QUIT
-
-
- At the outer menu level Q returns to the operating system.
-
-
-
-
-
- A Assemble
-
-
- The in-line assembler option allows you to enter instructions directly into
- memory. No symbols may be entered into the symbol table. Symbolic references
- are allowed only to those symbols learned from the .SYM file. A line beginning
- with a blank returns control to the main menu.
-
-
-
-
- B Set Offset Bias
-
-
-
- -2-
-
-
-
-
- The program space may be mapped into any address within a 64k space by the
- offset bias. You must execute this command if your program is to run outside
- the region bounded by 0 and the available memory limit.
-
-
-
-
-
- D Display Memory
-
-
-
- The display command is entered as:
-
-
- Dstart,end
-
-
- The end parameter is optional. The display will exhibit 16 bytes of memory if
- the end is ommitted. The start and end may consist of any valid expression
- using program symbols. The display will halt for key press after 15 lines.
- You may type ESCape to abort the display and return to the menu.
-
-
-
-
-
-
-
- E Enter Memory
-
-
-
- The enter memory command allows you to modify the workspace program memory.
- The command is entered as:
-
-
- Estart
-
-
- The display will present the current memory address and the current contents at
- that address. You may step over the current location without changing its
- contents by entering only a carriage return. Entering an 8 bit expression
- followed by a carriage return will store the value of the expression at the
- current address. You may abort the sequence by typing a period followed by a
- carriage return.
-
-
-
-
-
- F Fill Memory
-
-
-
- The memory fill command allows you to initialize a portion of the workspace
-
- -3-
-
-
-
-
- area. The command is entered as:
-
-
- Fstart,end,value
-
-
- The region between start and end inclusive will be filled with the byte value.
-
-
-
-
-
-
- M Move Memory
-
-
-
- The Move command allows you to move a block of workspace memory to another
- location. The command format is:
-
-
- Mstart,end,destination
-
-
-
- The block of memory from start to end inclusive will be moved to the
- destination location.
-
-
-
-
-
- S Search Memory
-
-
-
- The search function allows you to find a string of bytes in workspace memory.
- The command is entered as:
-
-
- Sstart,end,v1,v2,v3,......
-
-
-
- The search will display all locations within the interval start-end which
- contain the sequence v1,v2,v3..... No such display implies that the sequence
- was not found.
-
-
-
-
-
-
- U Disassemble Memory
-
-
-
- -4-
-
-
-
-
- The disassemble command is entered as:
-
-
- Ustart,end
-
-
- If the second parameter is absent the display will continue until ESCape is
- entered. The program will display 15 lines of code, and then pause for
- keyboard input before continuing. You may return to the main menu by typing
- ESCape.
-
-
-
-
-
-
-
- X Emulation Monitor
-
-
-
- The emulation monitor allows the processor simulation to execute the program.
- The monitor begins by asking for the execution address. This is the address
- for which simulation will begin. You may respond with any valid expression.
-
-
-
- Next the monitor requests a string of breakpoint addresses. Up to 10
- breakpoint addresses can be inserted in the program. The simulator will will
- check the program counter against this list before executing every instruction.
- If a match is found the simulator will enter the single step mode and display
- the instruction, and register values. If you wish to single step the program
- from the starting value you may type return as the response to the breakpoint
- query. Each breakpoint can be assigned a pass counter, the number of times the
- breakpoint must be reached before the break will be effected. The pass counter
- is assigned to a breakpoint by enclosing the pass count in parentheses after
- the breakpoint address. Thus in response to the breakpoint query you entry of:
-
-
- 100,200,300
-
-
- will impose first pass breakpoints at locations 100H,200H, and 300H. Suppose
- you wish to allow the instruction at 200H to be executed, say, three times
- before the break is imposed. Your response in this case would be:
-
-
- 100,200(3),300
-
-
- After the pass count is reached at 200H the break is imposed and the breakpoint
- is thereafter imposed at every instance the program reaches this location.
-
-
-
- Next the monitor requests a string of trap values. These are 16 bit values
-
- -5-
-
-
-
-
- which are to be tested against every instruction containing a 16 bit reference.
- If an instruction is found to contain a trap reference the simulator will enter
- the single step mode as if a breakpoint were reached.
-
-
-
- During the single step mode it is important to note that two instructions are
- displayed. The instruction just executed, and the next instruction to be
- executed pointed to by >. The status of the flags and registers is a
- consequence of the instruction(s) executed and not that highlighted by >.
-
-
-
- The program will run from the starting point without display until either a
- breakpoint or trap is reached, or until you type either ESCape,M,L,N,S,R,P, or
- G. ESCape aborts the simulator and returns to the main menu. While the program
- is free running typing L will cause the register display to be presented at
- each instruction, typing N will suppress the register display. Typing S will
- force the single step mode, and typing G will resume the free running mode.
- Typing P, followed by a hex value, allows you to force the program to execute
- at the PC corresponding to the new value. Typing R imposes a breakpoint at the
- next PC value. This selection is most useful in the single step mode to allow
- the emulator to skip over a subroutine CALL. The R command replaces the last
- breakpoint in your breakpoint list with the address of the instruction
- following the CALL, the single step and list flags are reset, and control is
- passed to the emulator allowing the program to free run until the return
- address is reached. Typing #nnn, where nnn is a valid expression, remember it
- is default hex, allows the emulator to run the next nnn steps, with display on
- but operator intervention turned off. Typing M enters the emulation menu
- program.
-
-
-
-
- The emulation menu presents a list of options in the manner of the main menu.
- The options available from the emulation menu include many of those from the
- main menu, and their manner of selection is identical. You may neither enter
- the emulation monitor nor load a program from the emulation menu. There are
- additional selections from the emulation menu which pertain to the execution of
- the program.
-
-
-
-
- A Show All Register Space
-
-
- The single step emulation display does not provide for the display of the
- entire register bank for some processors. This command allows you to view all
- the registers.
-
-
-
-
- B Reset Breakpoints
-
-
- -6-
-
-
-
-
-
- This option allows you to re-define the breakpoint list. All previous
- breakpoints are forgotten.
-
-
-
- D Display Memory (as in main menu)
-
-
-
-
- E Enter Memory (as in main menu)
-
-
-
-
- F Fill Memory (as in main menu)
-
-
-
-
- G Quit Single Step
-
-
- This command resets the single step flag. The program will execute in the free
- running mode when the menu is abandoned. The free running mode will continue
- until a break point is reached or until control is gained from the keyboard.
-
-
-
- H Trace History
-
-
- The emulator maintains a buffer of the last 16 instructions executed. You may
- examine this trace history by the H command.
-
-
-
-
-
-
- M Move Memory (as in main menu)
-
-
-
-
- P Set PC for next instruction
-
-
- You may force the emulator to resume execution at a new address. The pending
- instruction before forcing the new PC value is not executed.
-
-
-
-
-
-
- -7-
-
-
-
-
- Q Quit Menu
-
-
- Return to the emulator.
-
-
-
-
-
- R Set Registers
-
-
- You are prompted for the manner in which you may alter the current contents of
- the registers and flags.
-
-
-
-
-
-
- S Search Memory (as in main menu)
-
-
-
-
- T Reset Traps
-
-
- This option allows you to re-define the trap values. As with the breakpoint
- redefinition, all previous traps are forgotten.
-
-
-
-
-
-
- U Disassemble Memory (as in main menu)
-
-
-
-
- V Display Processor Status
-
-
- You may obtain a view of the current processor status by selecting the V item
- from the emulation menu. Remember that when you Quit the menu you will execute
- the next instruction of your program before you can get a chance to examine the
- processor. The V option allows you to examine the state before the next
- instruction. If you are in the single step mode, as opposed to interrupting
- the processor by typing M, the V display will duplicate what you saw just
- before entering the emulation menu.
-
-
-
-
- W Set Window
-
- -8-
-
-
-
-
-
-
- The processor status display allows for the definition of a memory window of 16
- bytes length. This window is shown along with the register and timing display.
- You may position this window within the workspace area by the W command:
-
-
- Wvalue
-
-
- The window will retain this value.
-
-
-
-
- Z Zero Trip Cycles
-
-
- The emulator maintains two counters which accumulate the number of processor
- cycles during program execution. These counters are set to zero at entry to
- the emulation monitor. One of these counters can be set to zero at any time by
- the emulation monitor.
-
-
-
-
-
- PROGRAM INPUT/OUTPUT
-
-
-
- If the processor supports i/o instructions the simulator will call routines to
- gain input from the keyboard, or display output on the console. Program output
- requires a key press from the user before execution continues. If the program
- is free running at this time, typing ESCape will enter the single step mode.
- To enter the single step mode for a free running program locked in an input
- loop, you must type an invalid hex input, say carriage return, and receive the
- invalid prompt message. At this point you may type ESCape to enter the single
- step mode. Emulation Speed
- As a rough indication of the relative speed of the emulation program, a
- simulation of the 65Cxx series on a 5MHz 8086 yielded approximately 1000
- simulated processor cycles per second. This is between one and two thousand
- times slower than the real execution speed.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -9-
-
-
-